<?php

namespace App\Http\Requests\Admin\LinkSite;
use App\Http\Requests\Request;
use Illuminate\Support\Facades\Input;

class UpdateRequest extends Request{
    public function authorize(){
        return true;
    }
    public function rules(){
        return [
            'link_name' => 'required',
            'link_sign' => 'required|alpha_dash|unique:link_site,link_sign,' . $this->id,
        ];
    }
    public function messages(){
        return [
            'link_name.required' => '友情站点名称必须填写',
            'link_sign.required' => '友情站点标识必须填写',
            'link_sign.alpha_dash' => '友情站点标识可以包含字母和数字，以及破折号和下划线',
            'link_sign.unique' => '友情站点标识已经存在',
        ];
    }
}